﻿<%@ Page Title="" Language="C#" MasterPageFile="~/BackOffice.Master" AutoEventWireup="true" CodeBehind="Survey_Report2.aspx.cs" Inherits="FYPDemo.Survey_Report2" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <table>
        <tr>
            <td>                
                <asp:Label ID="lblVendor" runat="server" Text="Vendor"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtVendor" runat="server"></asp:TextBox>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblDateFrom" runat="server" Text="Date From"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtDateFrom" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="txtDateFrom_CalendarExtender" runat="server" 
                    TargetControlID="txtDateFrom" Format="yyyy-MM-dd">
                </asp:CalendarExtender>
            </td>
        </tr>

        <tr>
            <td>
                <asp:Label ID="lblDateTo" runat="server" Text="Date To"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtDateTo" runat="server"></asp:TextBox>
                <asp:CalendarExtender ID="txtDateTo_CalendarExtender" runat="server" 
                    TargetControlID="txtDateTo" Format="yyyy-MM-dd">
                </asp:CalendarExtender>
            </td>
        </tr>   
        
        <tr>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="Search" 
                    onclick="btnSearch_Click" />
            </td>
            <td>
                <asp:Button ID="btnExport" runat="server" Text="Export" 
                    onclick="btnExport_Click" />
            </td>
        </tr>     
    </table>

    <asp:GridView ID="Survey_Report2_Grid" runat="server" 
        AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" 
        GridLines="None">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:TemplateField HeaderText = "No.">
                <ItemTemplate>
                    <%# Container.DataItemIndex + 1 %>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Member">
                <ItemTemplate>                    
                    <asp:LinkButton ID="lbVendor" runat="server" Text='<%#Eval("MemberName") %>'></asp:LinkButton>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "First Answer">
                <ItemTemplate>
                    <asp:Label ID="lblA1" runat="server"><%#Eval("A1") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Second Answer">
                <ItemTemplate>
                    <asp:Label ID="lblA2" runat="server"><%#Eval("A2") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Third Answer">
                <ItemTemplate>
                    <asp:Label ID="lblA3" runat="server"><%#Eval("A3") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Fourth Answer">
                <ItemTemplate>
                    <asp:Label ID="lblA4" runat="server"><%#Eval("A4") %></asp:Label>
                </ItemTemplate> 
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Fifth Answer">
                <ItemTemplate>
                    <asp:Label ID="lblA5" runat="server"><%#Eval("A5") %></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Comment">
                <ItemTemplate>
                    <asp:Label ID="lblTotalFeedback" runat="server"><%#Eval("Comment") %></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText = "Date Submitted">
                <ItemTemplate>
                    <asp:Label ID="lblDateSubmitted" runat="server"><%#Eval("DateSubmitted") %></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <EditRowStyle BackColor="#7C6F57" />
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#E3EAEB" />
        <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F8FAFA" />
        <SortedAscendingHeaderStyle BackColor="#246B61" />
        <SortedDescendingCellStyle BackColor="#D4DFE1" />
        <SortedDescendingHeaderStyle BackColor="#15524A" />
    </asp:GridView>
</asp:Content>
